package cn.com.egova.demoapplication;

import android.content.Intent;
import android.view.View;

import cn.com.egova.demoapplication.base.FuncListActivity;
import cn.com.egova.demoapplication.inter.ISelectListener;

public class MainActivity extends FuncListActivity {

    @Override
    public void initData() {
        data = new String[]{"补间动画-TweenAnimation", "帧动画-FrameAnimation","ValueAnimator-值变器",
                "属性动画-ObjectAnimator","布局动画-LayoutAnimation","Activity/Fragment转场动画",
                "估值器","插值器", "Android3.1+属性动画","综合实例-正弦运动","综合实例2-扩散收缩"};
        listener = new ISelectListener() {
            @Override
            public void onSelect(View view, int i) {
                Class clazz = null;
                switch (i) {
                    case 0:
                        clazz = TweenAnimaActivity.class;
                        break;
                    case 1:
                        clazz = FrameAnimaActivity.class;
                        break;
                    case 2:
                        clazz = ValueAnimatorActivity.class;
                        break;
                    case 3:
                        clazz = PropertyAnimaActivity.class;
                        break;
                    case 4:
                        clazz = LayoutAnimationActivity.class;
                        break;
                    case 5:
                        clazz = ActivityAnimationActivity.class;
                        break;
                    case 6:
                        clazz = TypeEvaluatorActivity.class;
                        break;
                    case 7:
                        clazz = InterpolatorActivity.class;
                        break;
                    case 8:
                        clazz = ViewPropertyAnimatorActivity.class;
                        break;
                    case 9:
                        clazz = ComplexOneActivity.class;
                        break;
                    case 10:
                        clazz = ComplexTwoActivity.class;
                        break;
                }

                Intent intent = new Intent(MainActivity.this, clazz);
                intent.putExtra("title",data[i]);
                startActivity(intent);
            }
        };
    }

    @Override
    public boolean isBackIconVisible() {
        return true;
    }
}
